home *** CD-ROM | disk | FTP | other *** search
- /* time.c Turbo C Bible Functions, p. 338 */
- #include <stdio.h>
- #include <time.h>
- main()
- {
- time_t tnow;
- time(&tnow);/* Get the time in seconds since 0 hrs GMT, 1/1/70
- * Convert the time to a string and print it. This
- * will be your local time provided you have set the
- * environment variable TZ to your time zone. The
- * default is PST with daylight saving enabled.
- * See "tzset" for details. */
- printf("Current time = %s\n", ctime(&tnow));
- }